import os

if __name__ == "__main__":
    path = "/home/ubuntu/Ascend/samples/cplusplus/level1_single_api/3_ir/IRBuild/data/tf"
    for file_name in os.listdir(path):
        if ".pb" not in file_name:
            continue
        file_name = file_name[0:len(file_name) - 3]
        print(">>>> Running IR_BUILD for: %s" % file_name)
        os.system("cd ~/onnx_samples/onnx_transformer/scripts;chmod +x tf2cann.sh;./tf2cann.sh %s;" % file_name)



